package com.park.service.impl.code;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.park.client.model.code.CodeModel;
import com.park.client.service.code.CodeService;
import com.park.dao.code.CodeMapper;
import com.park.service.impl.base.BaseServiceImpl;

@Service("codeService")
public class CodeServiceImpl  extends BaseServiceImpl<CodeModel> implements CodeService {
	
	@Autowired
	private CodeMapper codeMapper;

	@Override
	public boolean insert(CodeModel code) {
		return codeMapper.insert(code) == 1;
	}
	@Override
	public boolean deleteByPrimaryKey(Long id) {
		return codeMapper.deleteByPrimaryKey(id)==1;
	}
	@Override
	public boolean insertSelective(CodeModel record) {
		return codeMapper.insertSelective(record)==1;
	}
	@Override
	public CodeModel selectByPrimaryKey(Long id) {
		return codeMapper.selectByPrimaryKey(id);
	}
	@Override
	public boolean updateByPrimaryKeySelective(CodeModel record) {
		return codeMapper.updateByPrimaryKeySelective(record)==1;
	}
	@Override
	public boolean updateByPrimaryKey(CodeModel record) {
		return codeMapper.updateByPrimaryKey(record) == 1;
	}
	
	@Override
	public List<CodeModel> selectPagination(CodeModel t) {
		return codeMapper.selectPagination(t);
	}
	
	@Override
	public Integer selectTotal(CodeModel t) {
		return codeMapper.selectTotal(t);
	}
	

}
